Release 10.1A: OpenEdge Data Management:
DataServer for Microsoft SQL Server
Additional record locking details
In SQL Server, if transactions are scoped within other transactions, nested or embedded, all commit/rollback operations on the nested transactions are ignored by SQL server. Not until the transaction nesting levels are reduced to zero are all the nested levels actually committed or rolled back. This is a restriction of the data source with ramifications illustrated by the following code:
If the stored procedure
SPhas a commit or rollback statement within its TSQL, the commit or rollback isn’t actually executed until theENDstatement in the 4GL, when the transaction level returns to zero. Ifrecord2is also updated bySP, thenrecord2will be locked out to the 4GL transaction that’s also trying to update it.SPwill continue to holdrecord2and lock out the 4GL update even ifSPexplicitly commits the update inside the stored procedure. To avoid this problem, it is necessary to recode the example as follows:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |